﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master.Master" AutoEventWireup="true" CodeBehind="sellbill_add.aspx.cs" Inherits="WebInvoicingsys.system.sale.sellbill_add" %>
<%@ Register src="~/basecontrol/business/uc_from_product.ascx" tagname="uc_from_product" tagprefix="uc3" %>
<%@ Register src="~/basecontrol/business/uc_from_dates.ascx" tagname="uc_from_dates" tagprefix="uc2" %>
<%@ Register src="~/basecontrol/uc_from_settle.ascx" tagname="uc_from_settle" tagprefix="uc5" %>
<%@ Register src="~/basecontrol/sale/uc_from_saleplan.ascx" tagname="uc_from_saleplan" tagprefix="uc1" %>
<%@ Register src="~/basecontrol/uc_from_warehouse.ascx" tagname="uc_from_warehouse" tagprefix="uc4" %>
<%@ Register src="~/basecontrol/uc_from_customer.ascx" tagname="uc_from_customer" tagprefix="uc6" %>
<asp:Content ID="Content1" ContentPlaceHolderID="styles" runat="server">

<style type="text/css">
    
    .input_data_main
    {
        height:30px; vertical-align:middle; line-height:30px; float:left; font-size:10px;
    }

    .input_data_style
    {
        height:30px; vertical-align:middle; line-height:30px; float:left; margin-left:5px;
    }
    

</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="alert_text" runat="server">
    <%=alert_msg%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="main" runat="server">
    <div class="form-group" style="margin-left:30px">
    
        <div class="row-fluid">
            <div style="padding:5px;">
	            <asp:Button class="btn btn-xs btn-success" id="btnSave" runat="server" 
                    Text="保存" onclick="btnSave_Click"/>
                <asp:Button class="btn btn-xs btn-default" id="btnReset" runat="server" 
                    Text="重置" onclick="btnReset_Click"/>
                <asp:Button class="btn btn-xs btn-default" id="btnReturn" runat="server" 
                    Text="返回" onclick="btnReturn_Click"/>
	        </div>
        </div>

        <div class="row-fluid" style="margin-top:10px">
            <div class="input-group">
                <table>
                    <tr>
                        <td align="right">
                            <span class="input-group-addon">计划单号(*):</span>
                        </td>
                        <td align="left">
                            <uc1:uc_from_saleplan ID="uc_from_saleplan" runat="server" />
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">开单日期(*):</span>
                        </td>
                        <td align="left">
                            <uc2:uc_from_dates ID="uc_billdate" runat="server" />
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">发货仓库(*):</span>
                        </td>
                        <td align="left">
                            <uc4:uc_from_warehouse ID="uc_from_warehouse" runat="server" />
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">销售客户(*):</span>
                        </td>
                        <td align="left">
                            <uc6:uc_from_customer ID="uc_from_customer" runat="server" OnbtSelect_Click="uc_from_customer_OnbtSelect_Click"/>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">联系电话:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_phone" runat="server" class="form-control" placeholder="联系电话" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">传真:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_fax" runat="server" class="form-control" placeholder="传真" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">结算方式:</span>
                        </td>
                        <td align="left">
                            <uc5:uc_from_settle ID="uc_from_settle" runat="server" />
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">数期:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_period" runat="server" class="form-control" placeholder="数期" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                      <td align="right">
                            <span class="input-group-addon">到货日期(*):</span>
                      </td>
                      <td align="left">
                            <uc2:uc_from_dates ID="uc_arrivaldate" runat="server" />
                      </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">标注:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_marked" runat="server" class="form-control" placeholder="标注" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>
                    
                    <tr>
                        <td align="right">
                            <span class="input-group-addon">内部统计码:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_statistical" runat="server" class="form-control" placeholder="内部统计码" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">内部订单码:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_ordercoding" runat="server" class="form-control" placeholder="内部订单码" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">收货人:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_consignee" runat="server" class="form-control" placeholder="收货人" Width="300" MaxLength="32"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">收货地址:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_address" runat="server" class="form-control" placeholder="收货地址" Width="300" MaxLength="512"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">检测报告:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_testreport" runat="server" class="form-control" placeholder="检测报告" Width="300" MaxLength="254"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">发货方式:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_wayof" runat="server" class="form-control" placeholder="发货方式" Width="300" MaxLength="64"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td align="right">
                            <span class="input-group-addon">运费支付:</span>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txt_payment" runat="server" class="form-control" placeholder="运费支付" Width="300" MaxLength="64"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                      <td align="right">
                            <span class="input-group-addon">备注:</span>
                      </td>
                      <td align="left">
                            <asp:TextBox ID="txt_remark" runat="server" class="form-control" placeholder="备注" Width="300" MaxLength="254"></asp:TextBox>
                      </td>
                    </tr>
                </table>

            </div>
           
        </div>

        <hr align="center" color="#987cb9" size="2" />

        <div class="row-fluid">
            <table>
                <tr>
                    <td>
                        <div class="input_data_main">
                            <div class="input_data_style">
                                货品条码:
                            </div>
                            <div class="input_data_style">
                                <uc3:uc_from_product ID="uc_from_product" runat="server" />
                            </div>
                            <div class="input_data_style">
                                数量:
                            </div>
                            <div class="input_data_style">
                                <asp:TextBox ID="txt_qty" runat="server" class="form-control" placeholder="数量" Width="100" Font-Size="10px"  MaxLength="64"></asp:TextBox>
                            </div>
                            <div class="input_data_style">
                                单价:
                            </div>
                            <div class="input_data_style">
                                <asp:TextBox ID="txt_price" runat="server" class="form-control" placeholder="单价" Width="100" Font-Size="10px"  MaxLength="64"></asp:TextBox>
                            </div>
                            <div class="input_data_style">
                                备注:
                            </div>
                            <div class="input_data_style">
                                <asp:TextBox ID="txt_in_remark" runat="server" class="form-control" placeholder="备注" Width="100" Font-Size="10px" MaxLength="256"></asp:TextBox>
                            </div>
                            <div class="input_data_style">
                                <asp:Button class="btn btn-xs btn-success" id="btAddproduct" runat="server" Text="添加" onclick="btAddproduct_Click" />
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="row-fluid" style="margin-top:10px; vertical-align:middle">
                <div class="block-content collapse in">
                <div class="span12">
                    <table class="table table-bordered">
                    <thead style="background-color:Silver">
	                    <tr>
		                    <th>序号</th>
		                    <th>货品条码</th>
                            <th>货品全称</th>
                            <th>货品简称</th>
                            <th>货品类别</th>
                            <th>货品单位</th>
                            <th>货品规格</th>
                            <th>堆放方式</th>
                            <th>防护方式</th>
                            <th>数量</th>
                            <th>单价</th>
                            <th>备注</th>
                            <th>删除</th>
	                    </tr>
                    </thead>
                    <tbody>
                    <asp:Repeater ID="rplist" runat="server" onitemcommand="rplist_ItemCommand">
                    <ItemTemplate>
                    <tr>
		                <td><%#Eval("dgvID")%></td>
		                <td><%#Eval("productcode")%></td>
                        <td><%#Eval("productname")%></td>
                        <td><%#Eval("productshortname")%></td>
                        <td><%#Eval("goodsclassname")%></td>
                        <td><%#Eval("goodsunitname")%></td>
                        <td><%#Eval("goodsspecname")%></td>
                        <td><%#Eval("stackname")%></td>
                        <td><%#Eval("guardname")%></td>
                        <td><%#Eval("qty")%></td>
                        <td><%#Eval("price")%></td>
                        <td><%#Eval("remark")%></td>
                        <td>
                            <asp:LinkButton runat="server" ID="lbtDelete" CommandArgument='<%#Eval("productcode")%>'
                                CommandName="Delete" Text="删除" CssClass="btn btn-xs btn-warning"></asp:LinkButton>
                        </td>
	                </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <tr>
                            <td>
                                合计
                            </td>
                            <td colspan="8">
                                &nbsp;
                            </td>
                            <td>
                                <%=Total_qty%>
                            </td>
                            <td>
                                <%=Total_price%>
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </FooterTemplate>
                    </asp:Repeater>
                    </tbody>
                    </table>
                </div>
            </div>
            </div>
        </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>
